package com.job.sun.HomeWork0722;

import java.util.Map;
import java.util.Scanner;
import java.util.Set;

/**
 * @author 张春阳
 * @version 1.0
 * @since 2022-07-22 23:16:58
 */
public class TestPick {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入字符串");
        String next = sc.next();


        try {
            Map<String, Integer> pick = Pick.pick(next);
            Set<String> strings = pick.keySet();
            for (String string : strings) {
                System.out.println(string + "~~~" + pick.get(string));
            }
        } catch (OnlHaveNullException e) {
            System.out.println(e.str);
            e.printStackTrace();
        } catch (NullLettersAndNumbersException a) {
            System.out.println(a.str);
            a.printStackTrace();
        }
    }
}
